<?php
//start or continue session
session_start();

if (!isset($_SESSION['logged']) || $_SESSION['logged'] !=1) {
	header('Location: login.php?redirect='. $_SERVER['PHP_SELF']);
	die();
}
?>